import { getTickerLogin } from '@/api/user'
import * as types from './mutation-types'
import { setStore } from "../utils/mUtils";

export const getTicker = async function({ commit }, { ticket }) {
  const res = await getTickerLogin({ ticket }).then(res => res).catch(err => err)


    if (res.code == '200') {
      let result = res.data
      setStore('zhpk-sessionId', result.sessionId)
      commit(types.SET_USERINFO, result)
      
      
      return res
    }else{

      
      return res
    }

    
 


}

